<!DOCTYPE html>
<html>
  <head>
    <title>MyHtml.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<link rel="stylesheet" type="text/css" href="/myfirstweb/css/bootstrap.css">
	<link rel="stylesheet" type="text/css" href="/myfirstweb/css/font-awesome-4.5.0/css/font-awesome.min.css">
	<link rel="stylesheet" type="text/css" href="/myfirstweb/style.css">
	<script type='text/javascript' src='/myfirstweb/js/jquery-1.8.3.min.js'></script>
	<script type='text/javascript' src='/myfirstweb/js/bootstrap.min.js'></script>
	<script>
		$(document).ready(function(){
			$("#submit").click(function(){
				var usercode=$("#usercode").val();
				var password=$("#password").val();
				if(usercode.length<=0){
					alert("请输入用户名");
					return;
				}
				if(password.length<=0){
					alert("请输入密码");
					return;
				}
				$.ajax({
					type:"POST",
					url:"/loginconfirm",
					data: {usercode:usercode,password:password},
					dataType: "json",
					success:function(data){
						if(data.state=="fail"){
							$("#password").val("");
							$("#errMsg").text(data.data);
						}else{
							window.location.href="/index?usercode="+usercode;
						}
					}
				})
			})
		})
	</script>
  </head>
  <body class="loginBody">
  <div class="loginTitle">
	梦想<a style="font-size: 70px;">岂</a>止于<a style="font-size: 90px;font-weight: bold;">大</a></div>
	</div>
	<div class="loginTitleSec"><a>乘风破浪会有时</a> <a>直挂云帆济沧海</a></div>
	<div class="loginDiv"><input class="loginInput" type="text" id="usercode" placeholder="请输入用户名"></div>
  	<div class="loginDiv"><input class="loginInput"  type="password" id="password" placeholder="请输入密码"></div>
  	<div class="loginDiv"><input class="loginInput"  type="button" id="submit" value="登陆"></div>
	<div class="loginDiv"><span class="errMsg" id="errMsg"></span></div>
  </body>
</html>